#include <algorithm>
#include <cctype>
#include <cstdio>

typedef long long ll;
int const N = 2e5 + 5, M = 2e3 + 5, mod = 1e9 + 7, shf = 2e3 + 1;

template <typename T>
inline T &read(T &x) {
  x = 0;
  bool f = false;
  short ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = true;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + (ch ^ '0'), ch = getchar();
  if (f) x = -x;
  return x;
}

int n, a[N], b[N], fac[M * 4], inv[M * 4], f[M * 2][M * 2], ans;

inline ll qpow(ll base, int exp) {
  ll res = 1;
  while (exp) {
    if (exp & 1) res = (res * base) % mod;
    exp >>= 1;
    base = (base * base) % mod;
  }
  return res;
}

inline ll C(int n, int m) { return 1ll * fac[n] * inv[n - m] % mod * inv[m] % mod; }

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("AT1983 [AGC001E] BBQ Hard.in", "r", stdin);
  freopen("AT1983 [AGC001E] BBQ Hard.out", "w", stdout);
#endif
#endif

  read(n);
  for (int i = 1; i <= n; ++i) read(a[i]), read(b[i]), ++f[shf - a[i]][shf - b[i]];
  fac[0] = 1;
  for (int i = 1; i < M * 4; ++i) fac[i] = 1ll * fac[i - 1] * i % mod;
  inv[M * 4 - 1] = qpow(fac[M * 4 - 1], mod - 2);
  for (int i = M * 4 - 2; ~i; --i) inv[i] = 1ll * inv[i + 1] * (i + 1) % mod;
  for (int i = 1; i <= shf * 2; ++i)
    for (int j = 1; j <= shf * 2; ++j)
      if ((f[i][j] += (f[i - 1][j] + f[i][j - 1]) % mod) >= mod) f[i][j] -= mod;
  for (int i = 1; i <= n; ++i) {
    if ((ans += (f[shf + a[i]][shf + b[i]]) % mod) >= mod) ans -= mod;
    if ((ans -= C(2 * a[i] + 2 * b[i], 2 * a[i])) < 0) ans += mod;
  }
  printf("%lld", 1ll * ans * qpow(2, mod - 2) % mod);
  return 0;
}